package com.zdzx.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zdzx.model.service.content.param.UserCollectionCourse;
import com.zdzx.model.service.content.param.UserWatchArticle;
import com.zdzx.model.service.content.param.UserWatchCourse;
import com.zdzx.model.service.content.vo.Course;

public interface CourseMapper extends BaseMapper<Course>{
	
	IPage<UserWatchCourse> userWatchCourse(IPage<UserWatchCourse> page,@Param("userId")String userId,
			@Param("tenantId")String tenantId,@Param("startTime")String startTime,@Param("endTime")String endTime,
			@Param("sort")String sort);

	IPage<UserCollectionCourse> userCollectionCourse(IPage<UserCollectionCourse> page, @Param("userId")String userId);
	
	List<UserWatchCourse> userWatchCourseChildren(@Param("courseId")String courseId,@Param("userId")String userId);

	Integer userStudyTimeCount(@Param("userId")String userId,@Param("tenantId")String tenantId);

	Integer userWatchCourseCount(@Param("tenantId")String tenantId);

	List<Map<String,String>> courseBrowseStatistics(@Param("tenantId")String tenantId);
	
	List<Map<String,String>> courseBrowseStatistics1(@Param("tenantId")String tenantId);

	IPage<UserWatchArticle> userWatchArticle(Page<UserWatchArticle> page,@Param("userId") String id);
}